;===========================================
; NAME: OPTION.inc
; DESC: Configuration options for .S files
; HISTORY:
; 02.28.2002: ver 0.0
; 03.11.2003: ver 0.0	attached for 2440.
;===========================================

;Start address of each stacks,
_STACK_BASEADDRESS	EQU 0x33ff8000

;FCLK=2*(F_MDIV+8)*XTAL_SEL/((F_PDIV+2)*2^(F_SDIV))
;UCLK=(U_MDIV+8)*XTAL_SEL/((U_PDIV+2)*2^(U_SDIV))

	    GBLA	XTAL_SEL
XTAL_SEL    SETA	12000000

	    GBLA	FCLK
FCLK	SETA	400000000

		GBLA	UCLK
UCLK	SETA	48000000
    [ FCLK = 400000000
CLKDIV_VAL	EQU	5	; 0=1:1:1, 1=1:1:2, 2=1:2:2, 3=1:2:4, 4=1:4:4, 5=1:4:8, 6=1:3:3, 7=1:3:6.
M_MDIV		EQU	92
M_PDIV		EQU	1
M_SDIV		EQU	1
    ]

    [ FCLK = 532000000
CLKDIV_VAL	EQU	3	; 0=1:1:1, 1=1:1:2, 2=1:2:2, 3=1:2:4, 4=1:4:4, 5=1:4:8, 6=1:3:3, 7=1:3:6.
M_MDIV		EQU	127
M_PDIV		EQU	1
M_SDIV		EQU	1
    ]


	[ UCLK = 48000000
U_MDIV		EQU	56		;Fin=12.0MHz Fout=48MHz
U_PDIV		EQU	2
U_SDIV		EQU	2
	]

	[ UCLK = 96000000
U_MDIV		EQU	56		;Fin=12.0MHz Fout=96MHz
U_PDIV		EQU	2
U_SDIV		EQU	1
	]

	END
